<template>
  <div>
      <div>
        <Authc permissions="trade:order:childOrder:childOrderDetailForm">
          <a style="margin: 0 4px;" @click="handleDetail('childOrder')">对应子订单</a>
        </Authc>
        <Authc permissions="trade:order:blanketOrderDetailForm">
          <a @click="handleDetail('detail')">详情</a>
        </Authc>

        <!-- <a @click="handleDetail('refundOrder')">退款详情</a> -->
       <!-- <Tooltip placement="top" content="详情">
          <Icon class="normal-icon-style" type="ios-create" @click="handleDetail('detail')" />
        </Tooltip>
        <Tooltip placement="top" content="子订单详情">
          <Icon class="normal-icon-style" type="ios-create" @click="handleDetail('childOrder')" />
        </Tooltip>
        <Tooltip placement="top" content="退款详情">
          <Icon class="normal-icon-style" type="ios-create" @click="handleDetail('refundOrder')" />
        </Tooltip> -->
      </div>
  </div>
</template>
<script>
  import {
    Icon,
    Tooltip,
    Message,
    Modal
  } from "view-design";
  import {
    namespace
  } from "../../module/blanketModule";
  import Authc from "@/components/Authc";

  export default {
    props: {
      row: Object
    },
    model: {
      event: ["onEdit"]
    },
    components: {
      Icon,
      Tooltip,
      Message,
      Authc
    },
    data: function() {
      return {};
    },
    methods: {
      handleDetail(type) {
        let id = this.$props.row.orderId;
        switch (type) {
          case 'detail':
            this.$router.push({
                path: '/order/admin/orderCenter/BlanketOrderDetailForm', query: { id: id }
            });
            break
          case 'childOrder':
            this.$router.push({
                path: '/order/admin/orderCenter/childOrder', query: { orderId: id }
            });
            break
          case 'refundOrder':
            this.$router.push({
                path: '/order/admin/orderCenter/RefundOrder', query: { id: id }
            });
            break
          default:
        }


      }
    }
  };
</script>
<style lang="less">
  .normal-icon-style {
    font-size: 20px !important;
    color: #57a3f3 !important;
  }

  .error-icon-style {
    font-size: 20px !important;
    color: #ff0000 !important;
  }
</style>
